﻿using System;

namespace WpfAi.Core
{
    public class SingletonProvider<T> where T : class, new()
    {
        private SingletonProvider()
        { }

        public static T Instance
        {
            get { return SingletonCreator.instance; }
        }

        private class SingletonCreator
        {
            static SingletonCreator()
            {
                instance = new T();
            }

            internal static readonly T instance;
        }
    }
}
